#!usr/bin/env python  
# -*- coding:utf-8 _*-
""" 
@author:robot
@file: build_inspect_more.py 
@version:
@time: 2022/06/16 
"""
from TapDevops.build_jenkins.build_local import BuildLocal


class BuildInspect(BuildLocal):

    # 数据校验 only for data copy, count
    def inspect_more01(self, _type):
        title = ''
        path = ''
        if _type == 'data_inspect_initial':
            title = self.title_inspect_initial_count_moretable
            path = self.path_inspect_initial_count_moretable
        elif _type == 'data_inspect_cdc':
            title = self.title_inspect_cdc_count_moretable
            path = self.path_inspect_cdc_count_moretable
        elif _type == 'data_inspect_initial_cdc':
            title = self.title_inspect_initial_cdc_count_moretable
            path = self.path_inspect_initial_cdc_count_moretable
        data = self.common_build(
            title,
            path
        )
        self.build(
            data
        )

    # 数据校验 only for data copy, field
    def inspect_more02(self, _type):
        title = ''
        path = ''
        if _type == 'data_inspect_initial':
            title = self.title_inspect_initial_field_moretable
            path = self.path_inspect_initial_field_moretable
        elif _type == 'data_inspect_cdc':
            title = self.title_inspect_cdc_field_moretable
            path = self.path_inspect_cdc_field_moretable
        elif _type == 'data_inspect_initial_cdc':
            title = self.title_inspect_initial_cdc_field_moretable
            path = self.path_inspect_initial_cdc_field_moretable
        data = self.common_build(
            title,
            path
        )
        self.build(
            data
        )

    # 数据校验 only for data copy, jointField
    def inspect_more03(self, _type):
        title = ''
        path = ''
        if _type == 'data_inspect_initial':
            title = self.title_inspect_initial_jointField_moretable
            path = self.path_inspect_initial_jointField_moretable
        elif _type == 'data_inspect_cdc':
            title = self.title_inspect_cdc_jointField_moretable
            path = self.path_inspect_cdc_jointField_moretable
        elif _type == 'data_inspect_initial_cdc':
            title = self.title_inspect_initial_cdc_jointField_moretable
            path = self.path_inspect_initial_cdc_jointField_moretable
        data = self.common_build(
            title,
            path
        )
        self.build(
            data
        )
